//
// Created by Administrator on 2020/6/28.
//默认形参值例子:
#include <iostream>
#include <iomanip>
using namespace std;

int getVolume(int length,int width=2,int height=3);

int main()
{
    const int X=10,Y=12,Z=15;
    cout<<"Some box data is";
    cout<<getVolume(X,Y,Z)<<endl;//第一种
    cout<<"Some box data is";
    cout<<getVolume(X,Y)<<endl;//第二种
    cout<<"Some box data is";
    cout<<getVolume(X)<<endl;//第三种
    return 0;
}

int getVolume(int length,int width,int height)
{
    cout<<setw(5)<<length<<setw(5)<<width<<setw(5)<<height<<"\t";
    return length*width*height;
}

